package com.chaos.eurekaproducer.utils;

import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * @author liaopeng
 * @title: MyRejectionHandler
 * @projectName eureka-producer
 * @description: 自定义拒绝策略
 * @date 2021/9/27下午4:18
 */
public class MyRejectionHandler implements RejectedExecutionHandler {

    @Override
    public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
        System.out.println("存入数据库，之后手动补偿");

    }
}
